#/bin/bash

cd /home/pi/pipaper
[ -e config ] || mkdir config
[ -e config/config.sh ] || cp script/config.sh config/
. config/config.sh
if [ "$activate" = "true" ]; then
    sed -i "/needtostop/c needtostop=true" config/config.sh
else
    sed -i "/needtostart/c needtostart=true" config/config.sh
    reboot now
fi
# sudo sed -i '/pipaper/d' /etc/rc.local
# cd /home/pi/pipaper
# python3 src/clear.py
# sudo shutdown now